package com.gujiangbo.qrcode;

import org.iherus.codegen.qrcode.QrcodeGenerator;
import org.iherus.codegen.qrcode.SimpleQrcodeGenerator;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;

import java.io.IOException;

/**
 * @Author: gujiangbo.co
 * @Contact: 646832012@qq.com
 * @Date: 2022/1/21 10:39
 * @Version: 1.0
 * @Description: 二维码生成器
 */
@FixMethodOrder(MethodSorters.JVM)
public class QrCodeGenerateTest {

    @Test
    public void testSimpleQrcCode() throws IOException {
        String content = "https://gitee.com/iherus/qrext4j";
        String path = "/Users/gujiangbo/logs/qrc/gitee-log.jpg";
        new SimpleQrcodeGenerator().setLogo(path).generate(content).toFile("/Users/gujiangbo/logs/qrc/gitee.png");
    }


}
